package com.badibadi.activity;

import com.badibadi.mytools.Utils;
import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.ShowErWeiMaActivity;
import com.badibadi.uniclubber.R.layout;
import com.badibadi.uniclubber.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

//别人的资料
public class DataActivity extends MyDataActivity {
	private String uid;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		uid = getIntent().getStringExtra("uid");
//		   
		init();

	}

	private void init() {
		TextView title = (TextView) this.findViewById(R.id.title);
		title.setText(R.string.Data);
		this.findViewById(R.id.ApplyFor).setVisibility(View.GONE);
		this.findViewById(R.id.R_bgt).setVisibility(View.GONE);
		this.findViewById(R.id.R_jbye).setVisibility(View.GONE);
		this.findViewById(R.id.R_sjhm).setVisibility(View.GONE);
		this.findViewById(R.id.R_zfb).setVisibility(View.GONE);
		this.findViewById(R.id.R_zfbyhmc).setVisibility(View.GONE);
		// ApplyFor = (Button) this.findViewById(R.id.ApplyFor);
		// if (uid != null && !uid.equals(Utils.getUid(DataActivity.this))) {
		// ApplyFor.setVisibility(View.GONE);
		// } else {
		// ApplyFor.setVisibility(View.VISIBLE);
		// }
	}
	
	@Override
	protected void RefreshData() {
		// TODO Auto-generated method stub
		super.RefreshData();
		if (uid != null && !uid.equals(Utils.getUid(DataActivity.this))) {
			ApplyFor.setVisibility(View.GONE);
		} else {
			ApplyFor.setVisibility(View.VISIBLE);
		}
	}

	@Override
	protected void initData() {
		// TODO Auto-generated method stub

		this.findViewById(R.id.Ri_wdewm).setOnClickListener(
				new View.OnClickListener() {

					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(DataActivity.this,
								ShowErWeiMaActivity.class);
						intent.putExtra("erweima", Utils.getGeRenErWeiMa(id));
						startActivityForResult(intent, ErWeiMaZD);
					}
				});
	}

	@Override
	protected boolean isFirstLogin() {
		return false;
	}

}
